/*
Date:20210825 23:04pm
key:1.学到了C++的判断字符的函数!isalpha()和isdigit()
*/
#include<iostream>
#include<string>
using namespace std;
bool legal(string s){
    //int num=(int)s[0];
    if(!isalpha(s[0])){
        return false;
    }//48-57 65-112
    for(int i=0;i<s.size();i++){
        if(!isalpha(s[i])&&!isdigit(s[i]))
        {
            //cout<<s[i];
            return false;
        }
}
return true;
}
bool legal2(string s){
    for(int i=0;i<s.size();i++){
        if(isdigit(s[i]))
        {
            return true;
        }
}
return false;
}
//A65 a:97 0:48 9:57
int main(){
string s;
int T;
cin>>T;
for(int i=0;i<T;i++){
    cin>>s;
    if(legal(s)&&legal2(s)&&(s.size()>=2)){
        cout<<"Accept";
    }else{cout<<"Wrong";}
    if(i<T-1){cout<<"\n";}
    
}
}